<?php
import( 'de.ceus-media.framework.krypton.core.Logic' );
/**
 *	Logic Base Class with Validation
 *	@package		mv2.core
 *	@extends		Framework_Krypton_Core_Logic
 *	@author			Christian Würker <Christian.Wuerker@CeuS-Media.de>
 *	@since			21.02.2007
 *	@version		0.2
 */
/**
 *	Logic Base Class with Validation
 *	@package		mv2.core
 *	@extends		Framework_Krypton_Core_Logic
 *	@author			Christian Würker <Christian.Wuerker@CeuS-Media.de>
 *	@since			21.02.2007
 *	@version		0.2
 */
class Core_Logic extends Framework_Krypton_Core_Logic
{
	static public function getCategoryLogic( $category )
	{
		$category	= ucFirst( $category );
		import( "classes.logic.".$category );
		$logic		= eval( "return new Logic_".$category."();" );
		return $logic;
	}

	/**
	 *	Constructor, loads Definition Validator and Field Definition.
	 *	@access		public
	 *	@return		void
	 */
	public function __construct()
	{
		$this->registry		= Framework_Krypton_Core_Registry::getInstance();
		if( $this->registry->has( 'definition' ) )
			$this->definition	= $this->registry->get( 'definition' );
	}
}
?>
